﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:OverSatX">
    <Style TargetType="TextBlock">
        <Setter Property="FontFamily" Value="Trebuchet MS"></Setter>
    </Style>
    <Style x:Key="Title" TargetType="TextBlock">
        <Setter Property="FontFamily" Value="Trebuchet MS"></Setter>
        <Setter Property="FontWeight" Value="Bold"></Setter>
        <Setter Property="FontSize"  Value="30"></Setter>
    </Style>
    <Style x:Key="SubTitle" TargetType="TextBlock">
        <Setter Property="FontFamily" Value="Trebuchet MS"></Setter>
        <Setter Property="FontSize"  Value="19"></Setter>
    </Style>
    <Style x:Key="TinyTitle" TargetType="TextBlock">
        <Setter Property="FontFamily" Value="Trebuchet MS"></Setter>
        <Setter Property="FontSize"  Value="8"></Setter>
    </Style>
    <Style x:Key="FieldTitle" TargetType="TextBlock">
        <Setter Property="FontFamily" Value="Trebuchet MS"></Setter>
        <Setter Property="FontSize"  Value="12"></Setter>
        <Setter Property="FontWeight"  Value="Normal"></Setter>
    </Style>
    <Style x:Key="ButtonText" TargetType="TextBlock">
        <Setter Property="FontFamily" Value="Trebuchet MS"></Setter>
        <Setter Property="FontSize"  Value="14"></Setter>
    </Style>
    <Style TargetType="Button" x:Key="CustomButtonStyle">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Opacity)" Storyboard.TargetName="CustomButtonBorder">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0">
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TranslateTransform.Y)" Storyboard.TargetName="CustomButtonPosition">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <x:Int32>-2</x:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PointerOver"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ColorAnimation Storyboard.TargetProperty="(TextBox.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="CustomButtonText" To="Gray" />
                                        <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="CustomButtonBackground" To="#E6D9D6" Duration="00:00:00.1000000" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Grid x:Name="grid" Margin="0" >
                                <Grid.RenderTransform>
                                    <TranslateTransform x:Name="CustomButtonPosition" X="0" Y="0"/>
                                </Grid.RenderTransform>
                                <Grid Margin="0" x:Name="CustomButtonBorder" Opacity="1">
                                    <Border
                                        BorderBrush="#9E9999"
                                        BorderThickness="1"
                                        Background="{TemplateBinding Background}"/>
                                </Grid>
                                <Border x:Name="CustomButtonBackground"
                                    BorderBrush="{TemplateBinding Background}"
                                    BorderThickness="1"
                                    Background="#FFFFCC"  
                                    Margin="4 4 4 4"                                    
                                    >
                                    <TextBlock x:Name="CustomButtonText"
                                       FontFamily="Trebuchet MS"
                                        FontWeight="SemiBold"
                                        SelectionHighlightColor="{TemplateBinding Foreground}"
                                        FontSize="12"
                                        Foreground="Black"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Height="Auto"
                                        Width="Auto"
                                        Text="{Binding Content, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                                        Margin="8 8 8 8"/>
                                </Border>
                            </Grid>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
